// Copyright 2013-2019 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
//   https://www.imagemagick.org/script/license.php
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
// <auto-generated/>

using System;
using System.Security;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

#if Q8
using QuantumType = System.Byte;
#elif Q16
using QuantumType = System.UInt16;
#elif Q16HDRI
using QuantumType = System.Single;
#else
#error Not implemented!
#endif

namespace ImageMagick
{
    internal partial class DrawingSettings
    {
        #if !NETSTANDARD1_3
        [SuppressUnmanagedCodeSecurity]
        #endif
        private static class NativeMethods
        {
            #if PLATFORM_x64 || PLATFORM_AnyCPU
            public static class X64
            {
                #if PLATFORM_AnyCPU
                [SuppressMessage("Microsoft.Performance", "CA1810: InitializeReferenceTypeStaticFieldsInline", Scope = "member", Target = "ImageMagick.DrawingSettings+NativeMethods.X64#.cctor()")]
                static X64() { NativeLibraryLoader.Load(); }
                #endif
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_Create();
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_Dispose(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_BorderColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_BorderColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_FillColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FillColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_FillRule_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FillRule_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_Font_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_Font_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_FontFamily_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontFamily_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_FontPointsize_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontPointsize_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_FontStyle_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontStyle_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_FontWeight_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontWeight_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                [return: MarshalAs(UnmanagedType.Bool)]
                public static extern bool DrawingSettings_StrokeAntiAlias_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeAntiAlias_Set(IntPtr instance, [MarshalAs(UnmanagedType.Bool)] bool value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_StrokeColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_StrokeDashOffset_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeDashOffset_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_StrokeLineCap_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeLineCap_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_StrokeLineJoin_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeLineJoin_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_StrokeMiterLimit_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeMiterLimit_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_StrokeWidth_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeWidth_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                [return: MarshalAs(UnmanagedType.Bool)]
                public static extern bool DrawingSettings_TextAntiAlias_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextAntiAlias_Set(IntPtr instance, [MarshalAs(UnmanagedType.Bool)] bool value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_TextDirection_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextDirection_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_TextEncoding_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextEncoding_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_TextGravity_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextGravity_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_TextInterlineSpacing_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextInterlineSpacing_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_TextInterwordSpacing_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextInterwordSpacing_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_TextKerning_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextKerning_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_TextUnderColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextUnderColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetFillPattern(IntPtr Instance, IntPtr value, out IntPtr exception);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY, out IntPtr exception);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetStrokeDashArray(IntPtr Instance, double[] dash, UIntPtr length);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetStrokePattern(IntPtr Instance, IntPtr value, out IntPtr exception);
                [DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetText(IntPtr Instance, IntPtr value);
            }
            #endif
            #if PLATFORM_x86 || PLATFORM_AnyCPU
            public static class X86
            {
                #if PLATFORM_AnyCPU
                [SuppressMessage("Microsoft.Performance", "CA1810: InitializeReferenceTypeStaticFieldsInline", Scope = "member", Target = "ImageMagick.DrawingSettings+NativeMethods.X86#.cctor()")]
                static X86() { NativeLibraryLoader.Load(); }
                #endif
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_Create();
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_Dispose(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_BorderColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_BorderColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_FillColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FillColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_FillRule_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FillRule_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_Font_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_Font_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_FontFamily_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontFamily_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_FontPointsize_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontPointsize_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_FontStyle_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontStyle_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_FontWeight_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_FontWeight_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                [return: MarshalAs(UnmanagedType.Bool)]
                public static extern bool DrawingSettings_StrokeAntiAlias_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeAntiAlias_Set(IntPtr instance, [MarshalAs(UnmanagedType.Bool)] bool value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_StrokeColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_StrokeDashOffset_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeDashOffset_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_StrokeLineCap_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeLineCap_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_StrokeLineJoin_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeLineJoin_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_StrokeMiterLimit_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeMiterLimit_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_StrokeWidth_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_StrokeWidth_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                [return: MarshalAs(UnmanagedType.Bool)]
                public static extern bool DrawingSettings_TextAntiAlias_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextAntiAlias_Set(IntPtr instance, [MarshalAs(UnmanagedType.Bool)] bool value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_TextDirection_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextDirection_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_TextEncoding_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextEncoding_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern UIntPtr DrawingSettings_TextGravity_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextGravity_Set(IntPtr instance, UIntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_TextInterlineSpacing_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextInterlineSpacing_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_TextInterwordSpacing_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextInterwordSpacing_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern double DrawingSettings_TextKerning_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextKerning_Set(IntPtr instance, double value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern IntPtr DrawingSettings_TextUnderColor_Get(IntPtr instance);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_TextUnderColor_Set(IntPtr instance, IntPtr value);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetFillPattern(IntPtr Instance, IntPtr value, out IntPtr exception);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY, out IntPtr exception);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetStrokeDashArray(IntPtr Instance, double[] dash, UIntPtr length);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetStrokePattern(IntPtr Instance, IntPtr value, out IntPtr exception);
                [DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
                public static extern void DrawingSettings_SetText(IntPtr Instance, IntPtr value);
            }
            #endif
        }
        private sealed class NativeDrawingSettings : NativeInstance
        {
            static NativeDrawingSettings() { Environment.Initialize(); }
            protected override void Dispose(IntPtr instance)
            {
                #if PLATFORM_AnyCPU
                if (NativeLibrary.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                NativeMethods.X64.DrawingSettings_Dispose(instance);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                NativeMethods.X86.DrawingSettings_Dispose(instance);
                #endif
            }
            public NativeDrawingSettings()
            {
                #if PLATFORM_AnyCPU
                if (NativeLibrary.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                Instance = NativeMethods.X64.DrawingSettings_Create();
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                Instance = NativeMethods.X86.DrawingSettings_Create();
                #endif
                if (Instance == IntPtr.Zero)
                    throw new InvalidOperationException();
            }
            protected override string TypeName
            {
                get
                {
                    return nameof(DrawingSettings);
                }
            }
            public MagickColor BorderColor
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_BorderColor_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_BorderColor_Get(Instance);
                    #endif
                    return MagickColor.CreateInstance(result);
                }
                set
                {
                    using (INativeInstance valueNative = MagickColor.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_BorderColor_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_BorderColor_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public MagickColor FillColor
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_FillColor_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_FillColor_Get(Instance);
                    #endif
                    return MagickColor.CreateInstance(result);
                }
                set
                {
                    using (INativeInstance valueNative = MagickColor.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_FillColor_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_FillColor_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public FillRule FillRule
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_FillRule_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_FillRule_Get(Instance);
                    #endif
                    return (FillRule)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_FillRule_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_FillRule_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public string Font
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_Font_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_Font_Get(Instance);
                    #endif
                    return UTF8Marshaler.NativeToManaged(result);
                }
                set
                {
                    using (INativeInstance valueNative = UTF8Marshaler.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_Font_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_Font_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public string FontFamily
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_FontFamily_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_FontFamily_Get(Instance);
                    #endif
                    return UTF8Marshaler.NativeToManaged(result);
                }
                set
                {
                    using (INativeInstance valueNative = UTF8Marshaler.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_FontFamily_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_FontFamily_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public double FontPointsize
            {
                get
                {
                    double result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_FontPointsize_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_FontPointsize_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_FontPointsize_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_FontPointsize_Set(Instance, value);
                    #endif
                }
            }
            public FontStyleType FontStyle
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_FontStyle_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_FontStyle_Get(Instance);
                    #endif
                    return (FontStyleType)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_FontStyle_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_FontStyle_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public FontWeight FontWeight
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_FontWeight_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_FontWeight_Get(Instance);
                    #endif
                    return (FontWeight)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_FontWeight_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_FontWeight_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public bool StrokeAntiAlias
            {
                get
                {
                    bool result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeAntiAlias_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeAntiAlias_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_StrokeAntiAlias_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_StrokeAntiAlias_Set(Instance, value);
                    #endif
                }
            }
            public MagickColor StrokeColor
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeColor_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeColor_Get(Instance);
                    #endif
                    return MagickColor.CreateInstance(result);
                }
                set
                {
                    using (INativeInstance valueNative = MagickColor.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_StrokeColor_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_StrokeColor_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public double StrokeDashOffset
            {
                get
                {
                    double result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeDashOffset_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeDashOffset_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_StrokeDashOffset_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_StrokeDashOffset_Set(Instance, value);
                    #endif
                }
            }
            public LineCap StrokeLineCap
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeLineCap_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeLineCap_Get(Instance);
                    #endif
                    return (LineCap)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_StrokeLineCap_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_StrokeLineCap_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public LineJoin StrokeLineJoin
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeLineJoin_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeLineJoin_Get(Instance);
                    #endif
                    return (LineJoin)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_StrokeLineJoin_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_StrokeLineJoin_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public int StrokeMiterLimit
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeMiterLimit_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeMiterLimit_Get(Instance);
                    #endif
                    return (int)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_StrokeMiterLimit_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_StrokeMiterLimit_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public double StrokeWidth
            {
                get
                {
                    double result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_StrokeWidth_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_StrokeWidth_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_StrokeWidth_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_StrokeWidth_Set(Instance, value);
                    #endif
                }
            }
            public bool TextAntiAlias
            {
                get
                {
                    bool result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextAntiAlias_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextAntiAlias_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_TextAntiAlias_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_TextAntiAlias_Set(Instance, value);
                    #endif
                }
            }
            public TextDirection TextDirection
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextDirection_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextDirection_Get(Instance);
                    #endif
                    return (TextDirection)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_TextDirection_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_TextDirection_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public string TextEncoding
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextEncoding_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextEncoding_Get(Instance);
                    #endif
                    return UTF8Marshaler.NativeToManaged(result);
                }
                set
                {
                    using (INativeInstance valueNative = UTF8Marshaler.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_TextEncoding_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_TextEncoding_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public Gravity TextGravity
            {
                get
                {
                    UIntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextGravity_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextGravity_Get(Instance);
                    #endif
                    return (Gravity)result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_TextGravity_Set(Instance, (UIntPtr)value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_TextGravity_Set(Instance, (UIntPtr)value);
                    #endif
                }
            }
            public double TextInterlineSpacing
            {
                get
                {
                    double result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextInterlineSpacing_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextInterlineSpacing_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_TextInterlineSpacing_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_TextInterlineSpacing_Set(Instance, value);
                    #endif
                }
            }
            public double TextInterwordSpacing
            {
                get
                {
                    double result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextInterwordSpacing_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextInterwordSpacing_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_TextInterwordSpacing_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_TextInterwordSpacing_Set(Instance, value);
                    #endif
                }
            }
            public double TextKerning
            {
                get
                {
                    double result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextKerning_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextKerning_Get(Instance);
                    #endif
                    return result;
                }
                set
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_TextKerning_Set(Instance, value);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_TextKerning_Set(Instance, value);
                    #endif
                }
            }
            public MagickColor TextUnderColor
            {
                get
                {
                    IntPtr result;
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    result = NativeMethods.X64.DrawingSettings_TextUnderColor_Get(Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    result = NativeMethods.X86.DrawingSettings_TextUnderColor_Get(Instance);
                    #endif
                    return MagickColor.CreateInstance(result);
                }
                set
                {
                    using (INativeInstance valueNative = MagickColor.CreateInstance(value))
                    {
                        #if PLATFORM_AnyCPU
                        if (NativeLibrary.Is64Bit)
                        #endif
                        #if PLATFORM_x64 || PLATFORM_AnyCPU
                        NativeMethods.X64.DrawingSettings_TextUnderColor_Set(Instance, valueNative.Instance);
                        #endif
                        #if PLATFORM_AnyCPU
                        else
                        #endif
                        #if PLATFORM_x86 || PLATFORM_AnyCPU
                        NativeMethods.X86.DrawingSettings_TextUnderColor_Set(Instance, valueNative.Instance);
                        #endif
                    }
                }
            }
            public void SetFillPattern(IMagickImage value)
            {
                IntPtr exception = IntPtr.Zero;
                #if PLATFORM_AnyCPU
                if (NativeLibrary.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                NativeMethods.X64.DrawingSettings_SetFillPattern(Instance, value.GetInstance(), out exception);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                NativeMethods.X86.DrawingSettings_SetFillPattern(Instance, value.GetInstance(), out exception);
                #endif
                CheckException(exception);
            }
            public void SetAffine(double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY)
            {
                IntPtr exception = IntPtr.Zero;
                #if PLATFORM_AnyCPU
                if (NativeLibrary.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                NativeMethods.X64.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY, out exception);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                NativeMethods.X86.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY, out exception);
                #endif
                CheckException(exception);
            }
            public void SetStrokeDashArray(double[] dash, int length)
            {
                #if PLATFORM_AnyCPU
                if (NativeLibrary.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                NativeMethods.X64.DrawingSettings_SetStrokeDashArray(Instance, dash, (UIntPtr)length);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                NativeMethods.X86.DrawingSettings_SetStrokeDashArray(Instance, dash, (UIntPtr)length);
                #endif
            }
            public void SetStrokePattern(IMagickImage value)
            {
                IntPtr exception = IntPtr.Zero;
                #if PLATFORM_AnyCPU
                if (NativeLibrary.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                NativeMethods.X64.DrawingSettings_SetStrokePattern(Instance, value.GetInstance(), out exception);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                NativeMethods.X86.DrawingSettings_SetStrokePattern(Instance, value.GetInstance(), out exception);
                #endif
                CheckException(exception);
            }
            public void SetText(string value)
            {
                using (INativeInstance valueNative = UTF8Marshaler.CreateInstance(value))
                {
                    #if PLATFORM_AnyCPU
                    if (NativeLibrary.Is64Bit)
                    #endif
                    #if PLATFORM_x64 || PLATFORM_AnyCPU
                    NativeMethods.X64.DrawingSettings_SetText(Instance, valueNative.Instance);
                    #endif
                    #if PLATFORM_AnyCPU
                    else
                    #endif
                    #if PLATFORM_x86 || PLATFORM_AnyCPU
                    NativeMethods.X86.DrawingSettings_SetText(Instance, valueNative.Instance);
                    #endif
                }
            }
        }
        internal static INativeInstance CreateInstance(DrawingSettings instance)
        {
            if (instance == null)
                return NativeInstance.Zero;
            return instance.CreateNativeInstance();
        }
    }
}
